using System;

namespace FluentTests.Framework.Verbs
{
    public class Condition<T> : Verb<T>
    {
        public Condition(EnsuredWrapper<T> ensuredWrapperObject) : base(ensuredWrapperObject)
        {
        }

        //public EnsuredWrapper<T> And
        //{
        //    get
        //    {
        //        return new EnsuredWrapper<T>(this.AssertionProvider,(T) this.ActualValue);
        //    }
        //}

        public EnsuredWrapper<TResult> And<TResult>(Func<T,TResult> func)
        {
            var o = func.Invoke(EnsuredWrapperObject.ActualValue);
            return new EnsuredWrapper<TResult>(this.AssertionProvider, o);         
        }

        public EnsuredWrapper<T> And()
        {            
            return new EnsuredWrapper<T>(this.AssertionProvider, this.EnsuredWrapperObject.ActualValue);
        }

    }
}